package com.servlet.weatherincz;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import com.weatherinczbackend.Main;

/**
 * Servlet Listener
 * 
 * @author Bc. Michal Stava 255739 <255739@mail.muni.cz>
 */
@WebListener
public class StartListener implements ServletContextListener {
 
    /**
     * Initialize context. Start application.
     * @param ev 
     */
    @Override
    public void contextInitialized(ServletContextEvent ev) {
        System.out.println("aplikace inicializována");
        ServletContext servletContext = ev.getServletContext();   
    }
 
    /**
     * Destroy context. End application.
     * @param ev 
     */
    @Override
    public void contextDestroyed(ServletContextEvent ev) {
        System.out.println("aplikace končí");
    }
}